<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<!--#include file="admin_inc/admin.sqlfunction.asp" -->
<%
'作者：山林客（ah_bill）
'博客：http://ruizhinet.blog.163.com
'网站：http://www.ruizhinet.cn
'本信息不会影响您网站的正常访问，请保留
checkadmin(1)
%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>标签生成器</title>
<script type="text/javascript" src="admin_js/dateselect.js"></script>
<script type="text/javascript" src="admin_js/common.js"></script>
<script type="text/javascript" src="admin_js/net.js"></script>
<link type="text/css" href="style/style.css" rel="stylesheet" rev="stylesheet"/>
<script type="text/javascript">
<!--
	function generate(){
		var template;
		template=document.getElementById("template");
		var tagname=document.getElementById("tagname").value;
		var subtagtext="\r\n"+document.getElementById("subtagtext").value;
		var subtagbegin="\r\n"+document.getElementById("subtagbegin").value+"\r\n";
		subtagbegin=subtagbegin.replace("><",">\n<");
		var subtagend="\r\n"+document.getElementById("subtagend").value+"\r\n";
		subtagend=subtagend.replace("><",">\n<");
		var tag1pre="<!--{"+tagname;
		var tag1end="}-->";
		var tag2="<!--{/"+tagname+"}-->";
		var properties=document.getElementsByName("property");
		var el;
		var props="";
		var elclassname;
		for (var i=0;i<properties.length;i++){
			el=properties[i];
			if(el.value!=""){
				if(el.className=="undefined"||el.className==null || el.className=="")
				{
					props+=" "+el.id+"=\""+el.value+"\"";
				}else{
					elclassname=el.className;
					elclassname=elclassname.substring(2);
					if(el.value!=elclassname){
						props+=" "+el.id+"=\""+el.value+"\"";
					}
				}
			}
		}
		var result=tag1pre+props;
		result+=tag1end;
		result+=subtagbegin;
		result+=template.value;
		//result+=subtagtext;
		result+=subtagend;
		result+=tag2;
		result=result.replace(/(\n[\s|\t]*\r*\n)/g, "\n");
		if(v("result")!=""){
			if(tagname=="rzlist"||tagname=="rztype"){
				var startIndex=v("result").indexOf(tag1pre);
				var endIndex=v("result").indexOf(tag1end)+tag1end.length;
				var oldpval=v("result").substring(startIndex,endIndex);
				var result1=v("result").replace(oldpval,tag1pre+props+tag1end);
				if(tagname=="rzlist"){
					startIndex=result1.indexOf("<!--{loop}-->");
					if(startIndex!=-1){
						endIndex=result1.indexOf("<!--{/loop}-->")+"<!--{/loop}-->".length;
						oldpval=result1.substring(startIndex,endIndex);
						var n1="";
						var n2="";
						var n3="";
						var n4="";
						if(result1.substr(startIndex-1,1)==">")
							n1="\n"
						if(template.value.charAt(0)!="\n")
							n2="\n"
						if(template.value.charAt(template.value.length-1)!="\n")
							n3="\n"
						if(result1.substr(endIndex,1)=="<")
							n4="\n"
						result1=result1.replace(oldpval,n1+"<!--{loop}-->"+n2+template.value+n3+"<!--{/loop}-->"+n4);
						document.getElementById("result").value=result1;
					}else{
						document.getElementById("result").value=result;
					}
				}else{
					startIndex=result1.indexOf("<!--{loop1}-->");
					if(startIndex!=-1){
						endIndex=result1.indexOf("<!--{/loop1}-->")+"<!--{/loop1}-->".length;
						oldpval=result1.substring(startIndex,endIndex);
						var n1="";
						var n2="";
						var n3="";
						var n4="";
						if(result1.substr(startIndex-1,1)==">")
							n1="\n"
						if(template.value.charAt(0)!="\n")
							n2="\n"
						if(template.value.charAt(template.value.length-1)!="\n")
							n3="\n"
						if(result1.substr(endIndex,1)=="<")
							n4="\n"
						result1=result1.replace(oldpval,n1+"<!--{loop1}-->"+n2+template.value+n3+"<!--{/loop1}-->"+n4);
						document.getElementById("result").value=result1;
					}else{
						document.getElementById("result").value=result;
					}
				}
				document.getElementById("result").value=result1;

			}else{
				document.getElementById("result").value=result;
			}
		}
		else{
			document.getElementById("result").value=result;
		}
	}
	function AddSubTag(tag,tagname){
		var template=document.getElementById("template").value;
		if(template.indexOf("<!--{"+tag+"}-->")!=-1){
			alert("只能有一个"+tag+"子标签");
			return;
		}else{
			AddText("template","\r\n<!--{"+tag+"}-->请在这里放置"+tagname+"的HTML和替换标记<!--{/"+tag+"}-->")
		}
	}
	function ajax_SaveTag(){
		var tag_tag=$("tag_tag");
		var tag_name=$("tag_name");
		if(v("result")=="")
			generate();
		var flag=false;
		if(tag_tag.value==""||tag_name.value==""){
			if($("tag_prop").style.display==""){
				alert("请填写唯一标识和描述");
			}else{
				$("tag_prop").style.display="";
			}

		}else{
			if(v("act")=="add"&&checkExistTags()){
				alert("唯一标识重复，请使用其他标识");
			}else{
				$("rzform1").submit();
			}
			
		}
	}
	function checkExistTags(){
		var exists=v("exist_tags");
		var tag=","+v("tag_tag")+",";
		if(exists.indexOf(tag)!=-1)
			return true;
		return false;
	}
	function changelocation(sel){
		var flag=true;
		if(v("template")!="" || v("result")!=""){
			flag=confirm("当前的模板内容不为空，跳转后将清空当前页面的内容\r\n您确定要跳转吗？");
		}
		if(flag)
			location.href=sel.options[sel.selectedIndex].value;
	}
//-->
</script>
</head>
<body>
<div class="addrecord">
<%Dim qstring,tag_id,tag_name,tag_content,tag_tag,tag_type,tag_pre
tag_id=Trim(request.querystring("id"))
If tag_id<>"" Then 
	Dim rs,sql
	Set rs=server.CreateObject("adodb.recordset")
	sql="select * from c_tags where id="&tag_id
	rs.open sql,conn,1,1
	If Not rs.eof Then
	tag_tag=rs("tag_tag")
	tag_content=rs("tag_content")
	tag_name=rs("tag_name")
	tag_pre=rs("tag_pre")
	tag_type=rs("tag_type")
	qstring="tag_generator.asp?tag="&tag_pre
	If tag_type<>"" Then 
	qstring=qstring&"&type="&tag_type
	End If 
	Else
	response.redirect("tag_list.asp")
	End If 
	rs.close
	Set rs=Nothing 
Else 
	qstring="tag_generator.asp?"&Request.ServerVariables("Query_String")
End If 

Dim tag,stype
If tag_id<>"" Then
tag=tag_pre
stype=tag_type
Else 
tag=Trim(request.querystring("tag"))
stype=Trim(request.querystring("type"))
End If 

%>
<select id="addtag" onchange="changelocation(this);">
	<option value="#">请选择标签类型</option>
	<option value="#" style="background:#FFCC66;">列表标签{rzlist}</option>
	<option value="tag_generator.asp?tag=rzlist&type=article">&nbsp;&nbsp;&nbsp;└文章列表</option>
	<option value="tag_generator.asp?tag=rzlist&type=product">&nbsp;&nbsp;&nbsp;└商品列表</option>
	<option value="tag_generator.asp?tag=rzlist&type=photo">&nbsp;&nbsp;&nbsp;└图片列表</option>
	<option value="tag_generator.asp?tag=rzlist&type=job">&nbsp;&nbsp;&nbsp;└招聘列表</option>
	<option value="tag_generator.asp?tag=rzlist&type=guestbook">&nbsp;&nbsp;&nbsp;└留言列表</option>
	<option value="tag_generator.asp?tag=rzlist&type=recordcomment">&nbsp;&nbsp;&nbsp;└评论列表</option>
	<option value="tag_generator.asp?tag=rzlist&type=special">&nbsp;&nbsp;&nbsp;└专题列表</option>
	<option value="#" style="background:#FFCC66;">内容标签{rzcontent}</option>
	<option value="tag_generator.asp?tag=rzcontent&type=article">&nbsp;&nbsp;&nbsp;└文章内容</option>
	<option value="tag_generator.asp?tag=rzcontent&type=product">&nbsp;&nbsp;&nbsp;└商品内容</option>
	<option value="tag_generator.asp?tag=rzcontent&type=photo">&nbsp;&nbsp;&nbsp;└图片内容</option>
	<option value="tag_generator.asp?tag=rzcontent&type=job">&nbsp;&nbsp;&nbsp;└招聘内容</option>
	<option value="tag_generator.asp?tag=rzcontent&type=guestbook">&nbsp;&nbsp;&nbsp;└留言内容</option>
	<option value="tag_generator.asp?tag=rzcontent&type=recordcomment">&nbsp;&nbsp;&nbsp;└评论内容</option>
	<option value="#" style="background:#FFCC66;">分类/专题标签{rzst}</option>
	<option value="tag_generator.asp?tag=rzst&type=type">&nbsp;&nbsp;&nbsp;└分类内容</option>
	<option value="tag_generator.asp?tag=rzst&type=special">&nbsp;&nbsp;&nbsp;└专题内容</option>
	<option value="#" style="background:#FFCC66;">广告列表标签{rzad}</option>
	<option value="tag_generator.asp?tag=rzad&type=text">&nbsp;&nbsp;&nbsp;└文本广告</option>
	<option value="tag_generator.asp?tag=rzad&type=photo">&nbsp;&nbsp;&nbsp;└图片广告</option>
	<option value="tag_generator.asp?tag=rzad&type=flash">&nbsp;&nbsp;&nbsp;└Flash广告</option>
	<option value="tag_generator.asp?tag=rzad&type=code">&nbsp;&nbsp;&nbsp;└代码广告</option>
	<option value="tag_generator.asp?tag=rzlink" style="background:#FFCC66;">友情链接标签{rzlink}</option>
	<option value="tag_generator.asp?tag=rzlink">&nbsp;&nbsp;&nbsp;└友情链接列表</option>
	<option value="tag_generator.asp?tag=rztype" style="background:#FFCC66;">分类列表标签{rztype}</option>
	<option value="tag_generator.asp?tag=rztype">&nbsp;&nbsp;&nbsp;└分类列表</option>
	</select>
<script type="text/javascript">
<!--
	var addtags=document.getElementById("addtag").options;
	for(var i=0;i<addtags.length;i++){
		if(addtags[i].value=="<%=qstring%>"){
			addtags[i].selected=true;
			break;
		}
	}
//-->
</script>
</div>
<div id="generator">
<form name="rzform" id="rzform" method="post" action="#">

<%
Dim props,tag_subcontent,tmpprop

Function Init(content,ttag,stbegin,stend)
	If content="" Or IsNull(content) Then Exit Function 
	Dim pattern,regEx,Matches,Match,result,foundval,tmpval,tmpval2, newval,tagtype,tagval
	Set regEx=new RegExp   
	regEx.MultiLine = True
	If stbegin<>"" Then  
	regEx.Pattern=("(<!--\{)("&ttag&")(.*?)(\}-->[.\s\S]*?"&stbegin&"\s*?)([.\s\S]*?)(\s*?"&stend&"[.\s\S]*?<!--\{\/)("&ttag&")(\}-->)")

	Else
	regEx.Pattern=("(<!--\{)("&ttag&")(.*?)(\}-->)([.\s\S]*?)(<!--\{\/)("&ttag&")(\}-->)")
	End If 
	regEx.IgnoreCase=True
	regEx.Global=True
	Set Matches=regEx.Execute(content)
	If err.number<>0 Then
		response.write "错误:" & err.description
		err.clear
		Exit Function
	End If
	If Matches.count <>0 Then
		foundval=Matches(0).value
		props=regEx.Replace(foundval,"$3")
		tag_subcontent=regEx.Replace(foundval,"$5")
	End If
	set regEx=Nothing
End Function 

Function Prop(propname,def)
	If props="" Then 
		Prop=def
	Else
		Dim pattern,regEx,Matches,Match,result,foundval
		Set regEx=new RegExp   
		regEx.MultiLine = True
		regEx.Pattern=("("&propname&")(=\"")(\S+?)(\"")")
		regEx.IgnoreCase=True
		regEx.Global=True
		Set Matches=regEx.Execute(props)
		If err.number<>0 Then
			response.write "错误:" & err.description
			err.clear
			Exit Function
		End If
		If Matches.count <>0 Then
			foundval=Matches(0).value
			foundval=regEx.Replace(foundval,"$3")
		End If
		set regEx=Nothing
		Prop=foundval
	End If 
End Function 


Select Case tag%>
<%
Case "rzlist":
Call Init(tag_content,"rzlist","<!--{loop}-->","<!--{/loop}-->")
%>
<div class="header">可用属性：</div>
<input type="hidden" id="tagname" name="tagname" value="rzlist"/>
<input type="hidden" id="subtagbegin" name="subtagbegin" value="<!--{loop}-->"/>
<input type="hidden" id="subtagend" name="subtagend" value="<!--{/loop}-->"/>
<input type="hidden" id="subtagtext" name="subtagtext" value="请在这里放置普通记录的HTML和替换标记"/>
<div>
<ul>
<li>列表类型
<span class="inp">
<input type="text" name="property"  id="type" size="10" class="read" readonly value="<%=stype%>">
</span>
</li>
<li>标题长度
<span class="inp">
<input type="text" id="titlelength" name="property" class="r_0" value="<%=Prop("titlelength","")%>" size="2"  onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/>
</span>
</li>
<li>内容长度
<span class="inp">
<input type="text" id="contentlength" name="property" class="r_0" value="<%=Prop("contentlength","")%>" size="2" onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/>
</span>
</li>
<%If stype="product" Then %>
<li>仅选择有图片的记录
<span class="inp">
<%tmpprop=Prop("havephoto","0")%>
<select id="havephoto" name="property"  class="r_0">
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>否</option>
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>是</option>
</select>
</span>
</li>
<%End If%>
<%If stype="article" Or stype="product" Or stype="photo" Or stype="job" Or stype="guestbook" Or stype="recordcomment" Then %>
<li>分类路径
<span class="inp">
<input type="text" id="path" name="property" class="r_" value="<%=Prop("path","")%>" size="8" onkeyup="this.value=this.value.replace(/[^\d|,]+?/g,'')"/><input type="button" onclick="openWin('selectids.asp?idbox=path&act=typepath&type=<%=stype%>',450,500);" value="选择"/>(默认根据请求参数获取)</span>
</li>
<li>分类IDs
<span class="inp">
<input type="text" id="typeids" name="property" class="r_" value="<%=Prop("typeids","")%>" size="8" onkeyup="this.value=this.value.replace(/[^\d|,]+?/g,'')"/><input type="button" onclick="openWin('selectids.asp?idbox=typeids&act=typelist&type=<%=stype%>',450,500);" value="选择"/></span>
</li>
<%End If %>
<%If stype="article" Or stype="product" Or stype="photo" Then %>
<li>专题ID
<span class="inp">
<input type="text" id="specialid" name="property" class="r_0" value="<%=Prop("specialid","")%>" size="2" onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/><input type="button" onclick="openWin('selectids.asp?idbox=specialid&act=tsid&type=special',450,500);" value="选择"/>
(默认根据请求参数获取)</span>
</li>
<%End If %>
<%If stype="article" Or stype="product" Or stype="photo" Or stype="job" Or stype="special" Then %>
<li>排序规则
<%tmpprop=Prop("sort","0")%>
<span class="inp">
<select id="sort" name="property"  class="r_0">
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>置顶级别倒序+id倒序</option>
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>置顶级别倒序+更新时间倒序</option>
	<option value="2" <%If tmpprop="2" then%>selected="selected"<%End if%>>置顶级别倒序+点击数倒序</option>
	<option value="3" <%If tmpprop="3" then%>selected="selected"<%End if%>>id倒序</option>
	<option value="4" <%If tmpprop="4" then%>selected="selected"<%End if%>>id顺序</option>
	<option value="5" <%If tmpprop="5" then%>selected="selected"<%End if%>>更新时间倒序</option>
	<option value="6" <%If tmpprop="6" then%>selected="selected"<%End if%>>更新时间顺序</option>
	<option value="7" <%If tmpprop="7" then%>selected="selected"<%End if%>>点击数倒序</option>
	<option value="8" <%If tmpprop="8" then%>selected="selected"<%End if%>>点击数顺序</option>
</select>
</span>
</li>
<%End If %>
<li>记录数量
<span class="inp">
<input type="text" id="number" name="property" class="r_0" value="<%=Prop("number","0")%>" size="2" onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/>(0为显示所有)
</span>
</li>
<li>是否显示页码
<%tmpprop=Prop("showpagenum","0")%>
<span class="inp">
<select id="showpagenum" name="property"  class="r_0">
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>不显示</option>
	<option value="1" <%If tmpprop="2" then%>selected="selected"<%End if%>>显示（不带统计）</option>
	<option value="2" <%If tmpprop="2" then%>selected="selected"<%End if%>>显示（带统计）</option>
</select>
</span>
</li>
<li>每页记录数
<span class="inp">
<input type="text" id="pagesize" name="property" class="r_0" value="<%=Prop("pagesize","0")%>" size="3" onkeyup="this.value=this.value.replace(/[^\dx]+?/g,'')"/>(<a href="#" title="对于文章/商品/图片/招聘/留言的分类列表页面，可以设置为“x”来获取您在分类设置中所指定的每页记录数">说明</a>)
</span>
</li>
<li>语言
<%tmpprop=Prop("lang","")%>
<span class="inp">
<select id="lang" name="property"  class="r_">
	<option value="" <%If tmpprop="" then%>selected="selected"<%End if%>>根据请求参数获取</option>
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>中文</option>
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>英文</option>
</select>
</span>
</li>
<%If stype="article" Or stype="product" Or stype="photo" Or stype="job" Or stype="special" Then %>
<li>是否清除HTML标记
<%tmpprop=Prop("htmlclear","1")%>
<span class="inp">
<select id="htmlclear" name="property"  class="r_1">
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>清除</option>
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>不清除</option>
</select>(默认清除)
</span>
</li>
<%End if%>
<li>没有子分类时隐藏整个标签内容
<%tmpprop=Prop("notshow","0")%>
<span class="inp">
<select id="notshow" name="property"  class="r_0">
	<option value="0"  <%If tmpprop="0" then%>selected="selected"<%End if%>>否</option>
	<option value="1"  <%If tmpprop="1" then%>selected="selected"<%End if%>>是</option>
</select>
</span>
</li>
</ul>
<br class="clear"/>
注意：rzlist标签默认会根据请求参数中的分类路径（如“p17,29”）来获取分类信息，如果您手工指定了“分类IDs”，则取这些分类的记录。<br class="clear"/><span style="color:red;">“路径”和“分类IDs”属性只能指定其中一个!如果同时指定，则优先使用分类IDs</span>
</div>

<div class="header">单条记录代码：</div>
<div>可用替换标记：
<ul class="replacetext">
<%If stype="article" then%>
<li>标题(带链接)
<span class="inp2" onclick="AddText('template','${title}')">${title}</span>
</li>
<li>标题(不带链接)
<span class="inp2" onclick="AddText('template','${title_nolink}')">${title_nolink}</span>
</li>
<%End If %>
<%If stype="job" then%>
<li>职位名称(带链接)
<span class="inp2" onclick="AddText('template','${name}')">${name}</span>
</li>
<li>职位名称(不带链接)
<span class="inp2" onclick="AddText('template','${name_nolink}')">${name_nolink}</span>
</li>
<li>工作地点
<span class="inp2" onclick="AddText('template','${place}')">${place}</span>
</li>
<li>薪酬
<span class="inp2" onclick="AddText('template','${salary}')">${salary}</span>
</li>
<li>招聘人数
<span class="inp2" onclick="AddText('template','${number}')">${number}</span>
</li>
<%End If %>
<%If stype="product" then%>
<li>商品名称(带链接)
<span class="inp2" onclick="AddText('template','${productname}')">${productname}</span>
</li>
<li>商品名称(不带链接)
<span class="inp2" onclick="AddText('template','${productname_nolink}')">${productname_nolink}</span>
</li>
<li>商品图片(带链接)
<span class="inp2" onclick="AddText('template','${productimg}')">${productimg}</span>
</li>
<li>商品图片(不带链接)
<span class="inp2" onclick="AddText('template','${productimg_nolink}')">${productimg_nolink}</span>
</li>
<li>商品图片源地址
<span class="inp2" onclick="AddText('template','${productimg_src}')">${productimg_src}</span>
</li>
<li>商品型号
<span class="inp2" onclick="AddText('template','${model}')">${model}</span>
</li>
<%End If %>
<%If stype="photo" then%>
<li>图片名称(带链接)
<span class="inp2" onclick="AddText('template','${photoname}')">${photoname}</span>
</li>
<li>图片名称(不带链接)
<span class="inp2" onclick="AddText('template','${photoname_nolink}')">${photoname_nolink}</span>
</li>
<li>图片(带链接)
<span class="inp2" onclick="AddText('template','${productimg}')">${productimg}</span>
</li>
<li>图片(不带链接)
<span class="inp2" onclick="AddText('template','${productimg_nolink}')">${productimg_nolink}</span>
</li>
<li>图片源地址
<span class="inp2" onclick="AddText('template','${photoimg_src}')">${photoimg_src}</span>
</li>
<%End If %>
<%If stype="special" Then %>
<li>专题名称(带链接)
<span class="inp2" onclick="AddText('template','${specialname}')">${specialname}</span>
</li>
<li>专题名称(不带链接)
<span class="inp2" onclick="AddText('template','${specialname_nolink}')">${specialname_nolink}</span>
</li>
<li>专题图片(带链接)
<span class="inp2" onclick="AddText('template','${specialname}')">${specialimg}</span>
</li>
<li>专题图片(不带链接)
<span class="inp2" onclick="AddText('template','${specialname_nolink}')">${specialimg_nolink}</span>
</li>
<li>专题图片(带链接)
<span class="inp2" onclick="AddText('template','${specialname}')">${specialimg}</span>
</li>
<li>专题图片源地址
<span class="inp2" onclick="AddText('template','${specialname_nolink}')">${specialimg_src}</span>
</li>
<%End If %>
<%If stype="guestbook" Then %>
<li>留言标题(带链接)
<span class="inp2" onclick="AddText('template','${title}')">${title}</span>
</li>
<li>留言标题(不带链接)
<span class="inp2" onclick="AddText('template','${title_nolink}')">${title_nolink}</span>
</li>
<li>Email
<span class="inp2" onclick="AddText('template','${email}')">${email}</span>
</li>
<li>电话
<span class="inp2" onclick="AddText('template','${tel}')">${tel}</span>
</li>
<li>公司
<span class="inp2" onclick="AddText('template','${company}')">${company}</span>
</li>
<li>传真
<span class="inp2" onclick="AddText('template','${fax}')">${fax}</span>
</li>
<%End If %>
<%If stype="recordcomment" Then %>
<li>评论标题(带链接)
<span class="inp2" onclick="AddText('template','${title}')">${title}</span>
</li>
<li>评论标题(不带链接)
<span class="inp2" onclick="AddText('template','${title_nolink}')">${title_nolink}</span>
</li>
<li>Email
<span class="inp2" onclick="AddText('template','${email}')">${email}</span>
</li>
<%End If %>
<li>
<%If stype="article" Then response.write("文章内容")%>
<%If stype="product" Then response.write("商品内容")%>
<%If stype="photo" Then response.write("图片描述")%>
<%If stype="job" Then response.write("职位要求")%>
<%If stype="special" Then response.write("专题描述")%>
<%If stype="guestbook" Then response.write("留言内容")%>
<%If stype="recordcomment" Then response.write("评论内容")%>
<span class="inp2" onclick="AddText('template','${content}')">${content}</span>
</li>
<li>访问URL
<span class="inp2" onclick="AddText('template','${url}')">${url}</span>
</li>
<li>记录序号
<span class="inp2" onclick="AddText('template','${i}')">${i}</span>
</li>
<li>记录ID
<span class="inp2" onclick="AddText('template','${id}')">${id}</span>
</li>
<%If stype<>"special" Then %>
<li>发布人
<span class="inp2" onclick="AddText('template','${author}')">${author}</span>
</li>
<li>分类路径
<span class="inp2" onclick="AddText('template','${path}')">${path}</span>
</li>
<li>分类ID
<span class="inp2" onclick="AddText('template','${typeid}')">${typeid}</span>
</li>
<li>点击数
<span class="inp2" onclick="AddText('template','${hits}')">${hits}</span>
</li>
<li>发布日期(y-m-d)
<span class="inp2" onclick="AddText('template','${addtime}')">${addtime}</span>
</li>
<li>发布时间(y-m-d hh:mm:ss)
<span class="inp2" onclick="AddText('template','${fulltime}')">${fulltime}</span>
</li>
<li>Sitemap格式时间
<span class="inp2" onclick="AddText('template','${lastmod}')">${lastmod}</span>
</li>
<li>年
<span class="inp2" onclick="AddText('template','${year}')">${year}</span>
</li>
<li>月
<span class="inp2" onclick="AddText('template','${month}')">${month}</span>
</li>
<li>日
<span class="inp2" onclick="AddText('template','${day}')">${day}</span>
</li>
<%End If%>
<%If stype="article" Or stype="product" Or stype="photo"  then%>
<li>相关链接
<span class="inp2" onclick="AddText('template','${linkurl}')">${linkurl}</span>
</li>
<%End if%>
</ul>
<%If stype="guestbook" Or stype="recordcomment" Then %>
<br class="clear"/>
以下替换标记必须放在&lt;!--{reply}--&gt;标签内
<ul class="replacetext">
<li>回复内容
<span class="inp2" onclick="AddText('template','${replycontent}')">${replycontent}</span>
</li>
<li>回复时间（y-m-d）
<span class="inp2" onclick="AddText('template','${replytime}')">${replytime}</span>
</li>
<li>回复时间（y-m-d hh:mm:ss）
<span class="inp2" onclick="AddText('template','${replytime}')">${fullreplytime}</span>
</li>
<li>回复人
<span class="inp2" onclick="AddText('template','${replyauthor}')">${replyauthor}</span>
</li>
</ul>
<%End If%>

<br class="clear"/>
可用子标签
<ul id="subtag">
<li>第一条记录
<span class="inp2" onclick="AddSubTag('first','第一条记录');">&lt;!--{first}--&gt;&lt;!--{/first}--&gt;</span>
</li>
<li>奇数条记录
<span class="inp2" onclick="AddSubTag('odd','奇数条记录');">&lt;!--{odd}--&gt;&lt;!--{/odd}--&gt;</span>
</li>
<li>偶数条记录
<span class="inp2" onclick="AddSubTag('even','偶数条记录');">&lt;!--{even}--&gt;&lt;!--{/even}--&gt;</span>
</li>
<li>最后一条记录
<span class="inp2" onclick="AddSubTag('last','最后一条记录');">&lt;!--{last}--&gt;&lt;!--{/last}--&gt;</span>
</li>
<%If stype="guestbook" Or stype="recordcomment" Then %>
<li>回复记录
<span class="inp2" onclick="AddSubTag('reply','回复记录');">&lt;!--{reply}--&gt;&lt;!--{/reply}--&gt;</span><!-- (使用此子标签前你应将“是否显示回复”设置为“显示”) -->
</li>
<%End If %>
</ul>
</div>
<!--//////////////////////////rzcontent/////////////////////////-->
<%Case "rzcontent":
Call Init(tag_content,"rzcontent","","")
%>
<div class="header">可用属性：</div>
<input type="hidden" id="tagname" name="tagname" value="rzcontent"/>
<input type="hidden" id="subtagbegin" name="subtagbegin" value=""/>
<input type="hidden" id="subtagend" name="subtagend" value=""/>
<input type="hidden" id="subtagtext" name="subtagtext" value=""/>
<div>
<ul>
<li>类型
<span class="inp">
<input type="text" name="property"  id="type" size="10" class="read" readonly value="<%=stype%>">
</span>
</li>
<li>记录ID
<span class="inp">
<input type="text" id="id" name="property" class="r_" value="<%=Prop("id","")%>" size="2" onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/>(默认根据请求参数获取)
</span>
</li>
<li>标题长度
<span class="inp">
<input type="text" id="titlelength" name="property" class="r_0" value="0" size="2" onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/>
</span>
</li>
<li>内容长度
<span class="inp">
<input type="text" id="contentlength" name="property" class="r_0" value="<%=Prop("id","0")%>" size="2" onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/>
</span>
</li>
<li>显示上/下一条记录
<span class="inp">
<%tmpprop=Prop("shownext","0")%>
<select id="shownext" name="property"  class="r_0">
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>不显示</option>
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>显示</option>
</select>
</span>
</li>
<li>是否清除HTML标记
<span class="inp">
<%tmpprop=Prop("htmlclear","0")%>
<select id="htmlclear" name="property"  class="r_0">
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>不清除</option>
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>清除</option>
</select>
</span>
</li>
<%If stype="article" Or stype="product" Or stype="photo" Or stype="job" Then%>
<li>是否将标题（名称）设置为&lt;title&gt;
<span class="inp">
<%tmpprop=Prop("settitle","0")%>
<select id="settitle" name="property"  class="r_0">
	<option <%If tmpprop="0" then%>selected="selected"<%End if%>>否</option>
	<option <%If tmpprop="1" then%>selected="selected"<%End if%>>是</option>
</select>
</span>
</li>
<%End If%>
</ul>
</div>
<div class="header">单条记录代码：</div>
<div>可用替换标记：
<ul class="replacetext">
<%If stype="article" then%>
<li>标题
<span class="inp2" onclick="AddText('template','${title}')">${title}</span>
</li>
<%End If %>
<%If stype="job" then%>
<li>职位名称
<span class="inp2" onclick="AddText('template','${name}')">${name}</span>
</li>
<li>工作地点
<span class="inp2" onclick="AddText('template','${place}')">${place}</span>
</li>
<li>薪酬
<span class="inp2" onclick="AddText('template','${salary}')">${salary}</span>
</li>
<li>招聘人数
<span class="inp2" onclick="AddText('template','${number}')">${number}</span>
</li>
<%End If %>
<%If stype="product" then%>
<li>商品名称
<span class="inp2" onclick="AddText('template','${productname}')">${productname}</span>
</li>
<li>商品图片(带链接)
<span class="inp2" onclick="AddText('template','${productimg}')">${productimg}</span>
</li>
<li>商品图片(不带链接)
<span class="inp2" onclick="AddText('template','${productimg_nolink}')">${productimg_nolink}</span>
</li>
<li>商品图片源地址
<span class="inp2" onclick="AddText('template','${productimg_src}')">${productimg_src}</span>
</li>
<li>商品型号
<span class="inp2" onclick="AddText('template','${model}')">${model}</span>
</li>
<%End If %>
<%If stype="photo" then%>
<li>图片名称
<span class="inp2" onclick="AddText('template','${photoname}')">${photoname}</span>
</li>
<li>图片(带链接)
<span class="inp2" onclick="AddText('template','${productimg}')">${productimg}</span>
</li>
<li>图片(不带链接)
<span class="inp2" onclick="AddText('template','${productimg_nolink}')">${productimg_nolink}</span>
</li>
<li>图片源地址
<span class="inp2" onclick="AddText('template','${photoimg_src}')">${photoimg_src}</span>
</li>
<%End If %>
<%If stype="special" Then %>
<li>专题名称</span>
<span class="inp2" onclick="AddText('template','${specialname}')">${specialname}</span>
</li>
<li>专题图片(带链接)
<span class="inp2" onclick="AddText('template','${specialname}')">${specialimg}</span>
</li>
<li>专题图片(不带链接)
<span class="inp2" onclick="AddText('template','${specialname_nolink}')">${specialimg_nolink}</span>
</li>
<li>专题图片(带链接)
<span class="inp2" onclick="AddText('template','${specialname}')">${specialimg}</span>
</li>
<li>专题图片源地址
<span class="inp2" onclick="AddText('template','${specialname_nolink}')">${specialimg_src}</span>
</li>
<%End If %>
<li>
<%If stype="article" Then response.write("文章内容")%>
<%If stype="product" Then response.write("商品内容")%>
<%If stype="photo" Then response.write("图片描述")%>
<%If stype="job" Then response.write("职位要求")%>
<%If stype="special" Then response.write("专题描述")%>
<%If stype="guestbook" Then response.write("留言内容")%>
<%If stype="recordcomment" Then response.write("评论内容")%>
<span class="inp2" onclick="AddText('template','${content}')">${content}</span>
</li>
<li>访问URL
<span class="inp2" onclick="AddText('template','${url}')">${url}</span>
</li>
<%If stype<>"special" Then %>
<li>发布人
<span class="inp2" onclick="AddText('template','${author}')">${author}</span>
</li>
<li>分类路径
<span class="inp2" onclick="AddText('template','${path}')">${path}</span>
</li>
<li>分类ID
<span class="inp2" onclick="AddText('template','${typeid}')">${typeid}</span>
</li>
<li>点击数
<span class="inp2" onclick="AddText('template','${hits}')">${hits}</span>
</li>
<li>发布日期(y-m-d)
<span class="inp2" onclick="AddText('template','${addtime}')">${addtime}</span>
</li>
<li>发布时间(y-m-d hh:mm:ss)
<span class="inp2" onclick="AddText('template','${fulltime}')">${fulltime}</span>
</li>
<li>年
<span class="inp2" onclick="AddText('template','${year}')">${year}</span>
</li>
<li>月
<span class="inp2" onclick="AddText('template','${month}')">${month}</span>
</li>
<li>日
<span class="inp2" onclick="AddText('template','${day}')">${day}</span>
</li>
<%End If%>
<%If stype="article" Or stype="product" Or stype="photo"  then%>
<li>相关链接
<span class="inp2" onclick="AddText('template','${linkurl}')">${linkurl}</span>
</li>
<%End if%>
<%If stype="recordcomment" Then %>
<li>被评论记录标题(带超链接)
<span class="inp2" onclick="AddText('template','${recordtitle}')">${recordtitle}</span>
</li>
<li>被评论记录标题(不带超链接)
<span class="inp2" onclick="AddText('template','${recordtitle_nolink}')">${recordtitle_nolink}</span>
</li>
<li>被评论记录URL
<span class="inp2" onclick="AddText('template','${recordurl}')">${recordurl}</span>
</li>
<li>被评论记录图片(商品或图片记录适用)
<span class="inp2" onclick="AddText('template','${recordimage}')">${recordimage}</span>
</li>
<li>被评论记录详细内容
<span class="inp2" onclick="AddText('template','${recordcontent}')">${recordcontent}</span>
</li>
<%End If%>
</ul>
</ul>
<%If stype="guestbook" Or stype="recordcomment" Then %>
<br class="clear"/>
以下替换标记必须放在&lt;!--{reply}--&gt;标签内
<ul class="replacetext">
<li>回复内容
<span class="inp2" onclick="AddText('template','${replycontent}')">${replycontent}</span>
</li>
<li>回复时间（y-m-d）
<span class="inp2" onclick="AddText('template','${replytime}')">${replytime}</span>
</li>
<li>回复时间（y-m-d hh:mm:ss）
<span class="inp2" onclick="AddText('template','${replytime}')">${fullreplytime}</span>
</li>
<li>回复人
<span class="inp2" onclick="AddText('template','${replyauthor}')">${replyauthor}</span>
</li>
</ul>
<%End If%>
<%If stype="guestbook" Or stype="recordcomment" Then %>
<br class="clear"/>
可用子标签：
<ul id="subtag">
<li>回复记录
<span class="inp2" onclick="AddSubTag('reply','回复记录');">&lt;!--{reply}--&gt;&lt;!--{/reply}--&gt;</span><!-- (使用此子标签前你应将“是否显示回复”设置为“显示”) -->
</li>
</ul>
<%End If %>
</div>

<!--//////////rzst///////////////-->
<%Case "rzst":
Call Init(tag_content,"rzst","","")
%>
<div class="header">可用属性：</div>
<input type="hidden" id="tagname" name="tagname" value="rzst"/>
<input type="hidden" id="subtagbegin" name="subtagbegin" value=""/>
<input type="hidden" id="subtagend" name="subtagend" value=""/>
<input type="hidden" id="subtagtext" name="subtagtext" value=""/>
<div>
<ul>
<li>类型
<span class="inp">
<input type="text" name="property"  id="type" size="10" class="read" readonly value="<%=stype%>">
</span>
</li>
<li><%If stype="type" Then response.write("分类") Else response.write("专题") End If%>ID
<span class="inp">
<input type="text" id="id" name="property" class="r_" value="<%=Prop("id","")%>" size="2"  onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/><input type="button" onclick="openWin('selectids.asp?idbox=id&act=tsid&type=<%=stype%>',450,500);" value="选择"/>(默认根据请求参数获取)
</span>
</li>
<li>标题长度
<span class="inp">
<input type="text" id="titlelength" name="property" class="r_0" value="<%=Prop("titlelength","0")%>" size="2"  onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/>
</span>
</li>
<li>内容长度
<span class="inp">
<input type="text" id="contentlength" name="property" class="r_0" value="<%=Prop("contentlength","0")%>" size="2"  onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/>
</span>
</li>
<li>是否清除HTML标记
<span class="inp">
<%tmpprop=Prop("htmlclear","0")%>
<select id="htmlclear" name="property"  class="r_0">
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>不清除</option>
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>清除</option>
</select>
</span>
</li>
<li>仅当分类/专题有内容描述的时候显示
<span class="inp">
<%tmpprop=Prop("ifcontent","0")%>
<select id="ifcontent" name="property"  class="r_0">
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>否</option>
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>是</option>
</select>
</span>
</li>
<li>仅当分类/专题有图片的时候显示
<span class="inp">
<%tmpprop=Prop("ifimage","0")%>
<select id="ifimage" name="property"  class="r_0">
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>否</option>
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>是</option>
</select>
</span>
</li>
</span>
</li>
</ul>
</div>
<div class="header">单条记录代码：</div>
<div>可用替换标记：
<ul class="replacetext">
<li>分类(专题)ID
<span class="inp2" onclick="AddText('template','${id}')">${id}</span>
</li>
<li>分类(专题)名称
<span class="inp2" onclick="AddText('template','${name}')">${name}</span>
</li>
<li>分类(专题)描述
<span class="inp2" onclick="AddText('template','${content}')">${content}</span>
</li>
<li>图片
<span class="inp2" onclick="AddText('template','${img}')">${img}</span>
</li>
<li>图片源地址
<span class="inp2" onclick="AddText('template','${img_src}')">${img_src}</span>
</li>
<li>访问URL
<span class="inp2" onclick="AddText('template','${url}')">${url}</span>
</li>
<li>动态URL
<span class="inp2" onclick="AddText('template','${url_nonstatic}')">${url_nonstatic}</span>
</li>
</ul>
</div>
<%Case "rzad":
Call Init(tag_content,"rzad","","")
%>
<div class="header">可用属性：</div>
<input type="hidden" id="tagname" name="tagname" value="rzad"/>
<input type="hidden" id="subtagbegin" name="subtagbegin" value=""/>
<input type="hidden" id="subtagend" name="subtagend" value=""/>
<input type="hidden" id="subtagtext" name="subtagtext" value=""/>
<div>
<ul>
<li>类型
<span class="inp">
<input type="text" name="property"  id="type" size="10" class="read" readonly value="<%=stype%>">
</span>
</li>
<li>记录IDs
<span class="inp">
<input type="text" id="ids" name="property" class="r_" value="<%=Prop("ids","")%>" size="2"/><input type="button" onclick="openWin('selectids.asp?idbox=ids&act=ad&type=<%=stype%>',450,500);" value="选择"/>(ID，多个用逗号隔开)
</span>
</li>
<li>随机抽取
<span class="inp">
<%tmpprop=Prop("random","0")%>
<select id="random" name="property"  class="r_0">
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>否</option>
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>是</option>
</select>
</span>
</li>
<li>广告数量
<span class="inp">
<input type="text" id="number" name="property" class="r_" value="<%=Prop("number","1")%>" size="2" onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/>(必填，0为全部符合条件的记录)
</span>
</li>
<%If stype="photo" Or stype="flash" Or stype="text" Then %>
<li>串行输出
<span class="inp">
<%tmpprop=Prop("series","0")%>
<select id="series" name="property"  class="r_0">
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>否</option>
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>是</option>
</select>
</span>
</li>
<li>串行输出分隔符
<span class="inp">
<input type="text" id="separator" name="property" class="r_|" value="<%=Prop("separator","|")%>" size="1"/>
</span>
</li>
<%End if%>
<%If stype="photo" Or stype="flash" Then %>
<li>图片/Flash宽度
<span class="inp">
<input type="text" id="width" name="property" class="r_0" value="<%=Prop("width","")%>" size="2" onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/>（只抽取与该宽度匹配的记录）
</span>
</li>
<li>图片/Flash高度
<span class="inp">
<input type="text" id="height" name="property" class="r_0" value="<%=Prop("height","")%>" size="2" onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/>（只抽取与该高度匹配的记录）
</span>
</li>
<%End If%>
</ul>
</div>
<div class="header">单条记录代码：</div>
<div>可用替换标记：<br class="clear"/>
<%If stype="photo" Or stype="flash" Or stype="text" Then %>
适合列表输出：<%End if%>
<ul class="replacetext">
<%If stype="photo" Or stype="flash" Then %>
<li>图片/Flash源地址
<span class="inp2" onclick="AddText('template','${src}')">${src}</span>
</li>
<%End If%>
<li>广告标题
<span class="inp2" onclick="AddText('template','${alt}')">${alt}</span>
</li>
<li>广告描述
<span class="inp2" onclick="AddText('template','${desc}')">${desc}</span>
</li>
<li>广告序号
<span class="inp2" onclick="AddText('template','${i}')">${i}</span>
</li>
<%If stype="photo" Or stype="flash" Or stype="text" Then %>
<li>广告超链接
<span class="inp2" onclick="AddText('template','${href}')">${href}</span>
</li>
<%End if%>
<li>广告代码
<span class="inp2" onclick="AddText('template','${code}')">${code}</span>
</li>
</ul>
<%If stype="photo" Or stype="flash" Or stype="text" Then %>
<br class="clear"/>
适合串行输出：
<ul class="replacetext">
<li>图片/Flash源地址
<span class="inp2" onclick="AddText('template','${s_src}')">${s_src}</span>
</li>
<li>广告标题
<span class="inp2" onclick="AddText('template','${s_alt}')">${s_alt}</span>
</li>
<li>广告超链接
<span class="inp2" onclick="AddText('template','${s_href}')">${s_href}</span>
</li>
<li>广告描述
<span class="inp2" onclick="AddText('template','${s_desc}')">${s_desc}</span>
</li>
</ul>
<%End if%>
</div>
<%Case "rzlink":
Call Init(tag_content,"rzlink","","")
%>
<div class="header">可用属性：</div>
<input type="hidden" id="tagname" name="tagname" value="rzlink"/>
<input type="hidden" id="subtagbegin" name="subtagbegin" value=""/>
<input type="hidden" id="subtagend" name="subtagend" value=""/>
<input type="hidden" id="subtagtext" name="subtagtext" value=""/>
<div>
<ul>
<li>友情链接数量
<span class="inp">
<input type="text" id="number" name="property" class="r_0" value="<%=Prop("number","5")%>" size="2" onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/>(必填，0为全部)
</span>
</li>
<li>记录IDs
<span class="inp">
<input type="text" id="ids" name="property" class="r_" value="<%=Prop("ids","")%>" size="8" onkeyup="this.value=this.value.replace(/[^\d|,]+?/g,'')"/><input type="button" onclick="openWin('selectids.asp?idbox=ids&act=friendlink',450,500);" value="选择"/>(ID，多个用逗号隔开)
</span>
</li>
<li>随机抽取
<span class="inp">
<%tmpprop=Prop("random","0")%>
<select id="random" name="property"  class="r_0">
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>否</option>
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>是</option>
</select>
</span>
</li>
<li>标题长度
<span class="inp">
<input type="text" id="titlelength" name="property" class="r_0" value="<%=Prop("titlelength","0")%>" size="2" onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/>
</span>
</li>
</ul>
</div>
<div class="header">单条记录代码：</div>
<div>可用替换标记：<br class="clear"/>
<ul class="replacetext">
<li>网站名称
<span class="inp2" onclick="AddText('template','${name}')">${name}</span>
</li>
<li>网址
<span class="inp2" onclick="AddText('template','${url}')">${url}</span>
</li>
<li>Logo
<span class="inp2" onclick="AddText('template','${logo}')">${logo}</span>
</li>
<li>Logo图片源地址
<span class="inp2" onclick="AddText('template','${logo_src}')">${logo_src}</span>
</li>
<li>顺序号
<span class="inp2" onclick="AddText('template','${i}')">${i}</span>
</li>
</ul>
</div>
<%Case "rztype":
Call Init(tag_content,"rztype","<!--{level1}-->[.\s\S]*?<!--{loop1}-->","<!--{/loop1}-->[.\s\S]*?<!--{/level1}-->")
%>
<div class="header">可用属性：</div>
<input type="hidden" id="tagname" name="tagname" value="rztype"/>
<input type="hidden" id="subtagbegin" name="subtagbegin" value="<!--{level1}--><!--{loop1}-->"/>
<input type="hidden" id="subtagend" name="subtagend" value="<!--{/loop1}--><!--{/level1}-->"/>
<input type="hidden" id="subtagtext" name="subtagtext" value="请在这里放置普通记录的HTML和替换标记"/>
<div>
<ul>
<li>层次深度
<span class="inp">
<input type="text" id="depth" class="r_"  name="property" value="<%=Prop("depth","1")%>" size="2" onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/></span><span class="tips">(必填)</span>
</li>
<li>父亲分类ID
<span class="inp">
<input type="text" id="parentid" class="r_" name="property" value="<%=Prop("parentid","")%>" size="2" onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/></span><input type="button" onclick="openWin('selectids.asp?idbox=parentid&act=typeparent',450,500);" value="选择"/><span class="tips">(可选，默认为根据请求参数确定，根分类请填写0)</span>
</li>
<li>分类类型
<span class="inp">
<input type="text" id="types" class="r_"  name="property" class="r_0" value="<%=Prop("types","")%>" size="8" onkeyup="this.value=this.value.replace(/[^\d|,]+?/g,'')"/>
</span><input type="button" onclick="openWin('selectids.asp?idbox=types&act=fenlei',450,500);" value="选择"/><span class="tips">(数字，用逗号分隔：1为文章、2为商品、3为图片、4为外部链接、5为留言、6为单页分类、7为招聘)</span>
</li>
<li>分层输出
<span class="inp">
<%tmpprop=Prop("samelevel","0")%>
<select id="samelevel" name="property"  class="r_0">
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>否</option>
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>是</option>
</select></span><span class="tips">(输出完所有第一层分类，再输出第二层分类，而不是父子孙递归输出)</span>
</li>
<li>显示本分类下所有记录（包括子分类）
<span class="inp">
<%tmpprop=Prop("allrecord","0")%>
<select id="allrecord" name="property"  class="r_0">
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>否</option>
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>是</option>
</select></span><span class="tips">(<a href="#" title="只有在使用recordX子标签的时候有效">说明</a>)</span>
</li>
<li>显示记录数量
<span class="inp">
<input type="text" id="recordnumber" class="r_"  name="property" value="<%=Prop("recordnumber","0")%>" size="2" onkeyup="this.value=this.value.replace(/[^\d]+?/g,'')"/></span><span class="tips">(<a href="#" title="只有在使用recordX子标签的时候有效">说明</a>)</span>
</li>
<li>没有子分类时隐藏整个标签内容
<span class="inp">
<%tmpprop=Prop("notshow","0")%>
<select id="notshow" name="property"  class="r_0">
	<option value="0" <%If tmpprop="0" then%>selected="selected"<%End if%>>否</option>
	<option value="1" <%If tmpprop="1" then%>selected="selected"<%End if%>>是</option>
</select>
</span>
</li>
</ul>
</div>
<div class="header">单条记录代码：</div>
<div>可用替换标记：<br class="clear"/>
<ul class="replacetext">
<li>分类名称
<span class="inp2" onclick="AddText('template','${name}')">${name}</span>
</li>
<li>分类访问URL
<span class="inp2" onclick="AddText('template','${url}')">${url}</span>
</li>
<li>动态分类地址
<span class="inp2" onclick="AddText('template','${url_nonstatic}')">${url_nonstatic}</span><span class="tips">即使网站静态化也使用动态地址</span>
</li>
<li>分类ID
<span class="inp2" onclick="AddText('template','${id}')">${id}</span>
</li>
<li>分类图片
<span class="inp2" onclick="AddText('template','${typeimg}')">${typeimg}</span>
</li>
<li>顺序号
<span class="inp2" onclick="AddText('template','${i}')">${i}</span>
</li>
<li>父亲的顺序号
<span class="inp2" onclick="AddText('template','${pi}')">${pi}</span>
</li>
<li>分类路径
<span class="inp2" onclick="AddText('template','${path}')">${path}</span>
</li>
<li>分类层次
<span class="inp2" onclick="AddText('template','${lv}')">${lv}</span>
</li>
<li>Sitemap日期
<span class="inp2" onclick="AddText('template','${lastmod}')">${lastmod}</span>
</li>
</ul>
<br class="clear"/>
可用子标签
<ul id="subtag">
<li>第一条记录
<span class="inp2" onclick="AddSubTag('first1','第一条记录');">&lt;!--{first1}--&gt;&lt;!--{/first1}--&gt;</span>
</li>
<li>奇数条记录
<span class="inp2" onclick="AddSubTag('odd1','奇数条记录');">&lt;!--{odd1}--&gt;&lt;!--{/odd1}--&gt;</span>
</li>
<li>偶数条记录
<span class="inp2" onclick="AddSubTag('even1','偶数条记录');">&lt;!--{even1}--&gt;&lt;!--{/even1}--&gt;</span>
</li>
<li>最后一条记录
<span class="inp2" onclick="AddSubTag('last1','最后一条记录');">&lt;!--{last1}--&gt;&lt;!--{/last1}--&gt;</span>
</li>
<li>当前记录
<span class="inp2" onclick="AddSubTag('current1','当前记录');">&lt;!--{current1}--&gt;&lt;!--{/current1}--&gt;</span>
</li>
<li>该分类的明细记录
<span class="inp2" onclick="AddSubTag('record1','当前记录');">&lt;!--{record1}--&gt;&lt;!--{/record1}--&gt;</span>
</li>
</ul>
</div>
<%Case else:%>
请从下拉列表中选择标签再操作
<%End Select%>
<div><textarea id="template" name="template" cols="100" rows="8"><%=tag_subcontent%></textarea></div>
<div style="text-align:right;">更多高级用法，请参考<a href="http://www.ruizhinet.cn/guide"><u>《瑞志建站系统建站指引》</u></a>
<input  type="button" class="btn" onclick="generate();" value="生成标签代码">
</div>
<div class="header">标签代码：</div>
<%If tag="rzlist" Then %>
<div>
可用替换标记：
<ul class="replacetext"><li>分页页码(放在rzlist之内、loop之外)
<span class="inp2" onclick="AddText('result','${pagenum}')">${pagenum}</span>
</li></ul>
</div>
<%End If %>
<%If tag="rztype" Then %>
<div>
可用子标签：
<ul class="replacetext"><li>父亲分类(放在rztype和level1之间)
<span class="inp2" onclick="AddText('result','<!--{home}-->请在这里填写父亲分类的替换标记和HTML代码<!--{/home}-->')">&lt;!--{home}--&gt;&lt;!--{/home}--&gt;</span>
</li></ul>
</div>
<%End if%>
</form>
<form name="rzform1" id="rzform1" method="post" action="tag_save.asp">
<div>
<%
Function changetaghtml(content)
If IsNull(content) Or content="" then 
changetaghtml=""
Exit Function
End If 
content=Replace(content,"<","&#60;")
content=Replace(content,"&nbsp;","&#38;nbsp;")
changetaghtml=content
End Function 
%>
<textarea name="result" id="result" cols="100" rows="8"><%=changetaghtml(tag_content)%></textarea>
</div>
<div style="text-align:right;">
<%If tag_id<>"" Then %>
<input type="hidden" name="act" id="act" value="modify"/>
<%else%>
<input type="hidden" name="act" id="act" value="add"/>
<%End if%>
<input type="hidden" name="tag_id" id="tag_id" value="<%=tag_id%>"/>
<input type="hidden" name="tag_type" id="tag_type" value="<%=stype%>">
<input type="hidden" name="tag_pre" id="tag_pre" value="<%=tag%>">
<%If tag_id<>"" Then %>调用标记：<input type="text" id="txt" value="@{tag.<%=tag_tag%>}" size="20" onclick="this.select();" readonly style="background:#D7D7D7"/>&nbsp;&nbsp;<%End if%>
<span id="tag_prop" <%If tag_id="" then%>style="display:none;"<%End if%>>
唯一标识：<input type="text" name="tag_tag" id="tag_tag" maxlength="50" size="20" onkeyup="this.value=this.value.replace(/[^\w]+?/g,'')" value="<%=tag_tag%>"/>(a-z0-9_)
&nbsp;&nbsp;描述：<input type="text" name="tag_name" id="tag_name" maxlength="50" size="20" value="<%=tag_name%>"/>&nbsp;&nbsp;
</span>
<input  type="button" class="btn" onclick="ajax_SaveTag();"  value="保存">
&nbsp;&nbsp;<input  type="button" class="btn" onclick="generate();toClipboard(document.getElementById('result').value);" value="复制">
</div>
</form>
<%Dim rs1,sql1,existtag
existtag=","
Set rs1 = Server.CreateObject("ADODB.Recordset")
sql1 = "select * from [c_tags]"
rs1.open sql1,conn,1,1
Do While Not rs1.eof
existtag=existtag&rs1("tag_tag")&","
rs1.movenext
loop
rs1.close
Set rs1=nothing
%>
<input type="hidden" id="exist_tags" value="<%=existtag%>"/>
</div>
</body>
</html>